Integrand size = 23, antiderivative size = 112 \[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=-\frac {d^2 x}{2 b^2}+\frac {(c+d x)^3}{3 d}+\frac {3 d (c+d x) \cos ^2(a+b x)}{2 b^2}-\frac {d^2 \cos (a+b x) \sin (a+b x)}{b^3}+\frac {2 (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b}-\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2} \]
-1/2*d^2*x/b^2+1/3*(d*x+c)^3/d+3/2*d*(d*x+c)*cos(b*x+a)^2/b^2-d^2*cos(b*x+ a)*sin(b*x+a)/b^3+2*(d*x+c)^2*cos(b*x+a)*sin(b*x+a)/b-1/2*d*(d*x+c)*sin(b* x+a)^2/b^2
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.65 \[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=c^2 x+c d x^2+\frac {d^2 x^3}{3}+\frac {d (c+d x) \cos (2 (a+b x))}{b^2}+\frac {\left (-d^2+2 b^2 (c+d x)^2\right ) \sin (2 (a+b x))}{2 b^3} \]
c^2*x + c*d*x^2 + (d^2*x^3)/3 + (d*(c + d*x)*Cos[2*(a + b*x)])/b^2 + ((-d^ 2 + 2*b^2*(c + d*x)^2)*Sin[2*(a + b*x)])/(2*b^3)
Time = 0.31 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4931, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x)^2 \sin (3 a+3 b x) \csc (a+b x) \, dx\) |
\(\Big \downarrow \) 4931 |
\(\displaystyle \int \left (3 (c+d x)^2 \cos ^2(a+b x)-(c+d x)^2 \sin ^2(a+b x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d^2 \sin (a+b x) \cos (a+b x)}{b^3}-\frac {d (c+d x) \sin ^2(a+b x)}{2 b^2}+\frac {3 d (c+d x) \cos ^2(a+b x)}{2 b^2}+\frac {2 (c+d x)^2 \sin (a+b x) \cos (a+b x)}{b}-\frac {d^2 x}{2 b^2}+\frac {(c+d x)^3}{3 d}\) |
-1/2*(d^2*x)/b^2 + (c + d*x)^3/(3*d) + (3*d*(c + d*x)*Cos[a + b*x]^2)/(2*b ^2) - (d^2*Cos[a + b*x]*Sin[a + b*x])/b^3 + (2*(c + d*x)^2*Cos[a + b*x]*Si n[a + b*x])/b - (d*(c + d*x)*Sin[a + b*x]^2)/(2*b^2)
3.4.70.3.1 Defintions of rubi rules used
Int[((e_.) + (f_.)*(x_))^(m_.)*(F_)[(a_.) + (b_.)*(x_)]^(p_.)*(G_)[(c_.) + (d_.)*(x_)]^(q_.), x_Symbol] :> Int[ExpandTrigExpand[(e + f*x)^m*G[c + d*x] ^q, F, c + d*x, p, b/d, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && Member Q[{Sin, Cos}, F] && MemberQ[{Sec, Csc}, G] && IGtQ[p, 0] && IGtQ[q, 0] && E qQ[b*c - a*d, 0] && IGtQ[b/d, 1]
Time = 0.69 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.85
method | result | size |
risch | \(\frac {d^{2} x^{3}}{3}+d c \,x^{2}+c^{2} x +\frac {c^{3}}{3 d}+\frac {d \left (d x +c \right ) \cos \left (2 x b +2 a \right )}{b^{2}}+\frac {\left (2 x^{2} d^{2} b^{2}+4 b^{2} c d x +2 b^{2} c^{2}-d^{2}\right ) \sin \left (2 x b +2 a \right )}{2 b^{3}}\) | \(95\) |
default | \(-c^{2} x -\frac {d^{2} x^{3}}{3}+\frac {4 c^{2} \left (\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{2}+\frac {x b}{2}+\frac {a}{2}\right )}{b}-d c \,x^{2}+\frac {4 d^{2} \left (\left (x b +a \right )^{2} \left (\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{2}+\frac {x b}{2}+\frac {a}{2}\right )+\frac {\left (x b +a \right ) \cos \left (x b +a \right )^{2}}{2}-\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{4}-\frac {x b}{4}-\frac {a}{4}-\frac {\left (x b +a \right )^{3}}{3}-2 a \left (\left (x b +a \right ) \left (\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{2}+\frac {x b}{2}+\frac {a}{2}\right )-\frac {\left (x b +a \right )^{2}}{4}-\frac {\sin \left (x b +a \right )^{2}}{4}\right )+a^{2} \left (\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{2}+\frac {x b}{2}+\frac {a}{2}\right )\right )}{b^{3}}+\frac {8 c d \left (\left (x b +a \right ) \left (\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{2}+\frac {x b}{2}+\frac {a}{2}\right )-\frac {\left (x b +a \right )^{2}}{4}-\frac {\sin \left (x b +a \right )^{2}}{4}-a \left (\frac {\cos \left (x b +a \right ) \sin \left (x b +a \right )}{2}+\frac {x b}{2}+\frac {a}{2}\right )\right )}{b^{2}}\) | \(294\) |
1/3*d^2*x^3+d*c*x^2+c^2*x+1/3/d*c^3+1/b^2*d*(d*x+c)*cos(2*b*x+2*a)+1/2*(2* b^2*d^2*x^2+4*b^2*c*d*x+2*b^2*c^2-d^2)/b^3*sin(2*b*x+2*a)
Time = 0.24 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.99 \[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=\frac {b^{3} d^{2} x^{3} + 3 \, b^{3} c d x^{2} + 6 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right )^{2} + 3 \, {\left (2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + 2 \, b^{2} c^{2} - d^{2}\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{3} c^{2} - b d^{2}\right )} x}{3 \, b^{3}} \]
1/3*(b^3*d^2*x^3 + 3*b^3*c*d*x^2 + 6*(b*d^2*x + b*c*d)*cos(b*x + a)^2 + 3* (2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 - d^2)*cos(b*x + a)*sin(b*x + a) + 3*(b^3*c^2 - b*d^2)*x)/b^3
\[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=\int \left (c + d x\right )^{2} \sin {\left (3 a + 3 b x \right )} \csc {\left (a + b x \right )}\, dx \]
Time = 0.24 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.96 \[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=\frac {{\left (b x + \sin \left (2 \, b x + 2 \, a\right )\right )} c^{2}}{b} + \frac {{\left (b^{2} x^{2} + 2 \, b x \sin \left (2 \, b x + 2 \, a\right ) + \cos \left (2 \, b x + 2 \, a\right )\right )} c d}{b^{2}} + \frac {{\left (2 \, b^{3} x^{3} + 6 \, b x \cos \left (2 \, b x + 2 \, a\right ) + 3 \, {\left (2 \, b^{2} x^{2} - 1\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} d^{2}}{6 \, b^{3}} \]
(b*x + sin(2*b*x + 2*a))*c^2/b + (b^2*x^2 + 2*b*x*sin(2*b*x + 2*a) + cos(2 *b*x + 2*a))*c*d/b^2 + 1/6*(2*b^3*x^3 + 6*b*x*cos(2*b*x + 2*a) + 3*(2*b^2* x^2 - 1)*sin(2*b*x + 2*a))*d^2/b^3
Leaf count of result is larger than twice the leaf count of optimal. 313 vs. \(2 (104) = 208\).
Time = 0.32 (sec) , antiderivative size = 313, normalized size of antiderivative = 2.79 \[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=\frac {6 \, b^{2} c^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 12 \, {\left (b x + a\right )} b c d \cos \left (b x + a\right ) \sin \left (b x + a\right ) - 12 \, a b c d \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 6 \, {\left (b x + a\right )}^{2} d^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right ) - 12 \, {\left (b x + a\right )} a d^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 6 \, a^{2} d^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 3 \, {\left (b x + a\right )} b^{2} c^{2} + 3 \, {\left (b x + a\right )}^{2} b c d - 6 \, {\left (b x + a\right )} a b c d + {\left (b x + a\right )}^{3} d^{2} - 3 \, {\left (b x + a\right )}^{2} a d^{2} + 3 \, {\left (b x + a\right )} a^{2} d^{2} + 3 \, b c d \cos \left (b x + a\right )^{2} + 3 \, {\left (b x + a\right )} d^{2} \cos \left (b x + a\right )^{2} - 3 \, a d^{2} \cos \left (b x + a\right )^{2} - 3 \, b c d \sin \left (b x + a\right )^{2} - 3 \, {\left (b x + a\right )} d^{2} \sin \left (b x + a\right )^{2} + 3 \, a d^{2} \sin \left (b x + a\right )^{2} - 3 \, d^{2} \cos \left (b x + a\right ) \sin \left (b x + a\right )}{3 \, b^{3}} \]
1/3*(6*b^2*c^2*cos(b*x + a)*sin(b*x + a) + 12*(b*x + a)*b*c*d*cos(b*x + a) *sin(b*x + a) - 12*a*b*c*d*cos(b*x + a)*sin(b*x + a) + 6*(b*x + a)^2*d^2*c os(b*x + a)*sin(b*x + a) - 12*(b*x + a)*a*d^2*cos(b*x + a)*sin(b*x + a) + 6*a^2*d^2*cos(b*x + a)*sin(b*x + a) + 3*(b*x + a)*b^2*c^2 + 3*(b*x + a)^2* b*c*d - 6*(b*x + a)*a*b*c*d + (b*x + a)^3*d^2 - 3*(b*x + a)^2*a*d^2 + 3*(b *x + a)*a^2*d^2 + 3*b*c*d*cos(b*x + a)^2 + 3*(b*x + a)*d^2*cos(b*x + a)^2 - 3*a*d^2*cos(b*x + a)^2 - 3*b*c*d*sin(b*x + a)^2 - 3*(b*x + a)*d^2*sin(b* x + a)^2 + 3*a*d^2*sin(b*x + a)^2 - 3*d^2*cos(b*x + a)*sin(b*x + a))/b^3
Time = 0.37 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.08 \[ \int (c+d x)^2 \csc (a+b x) \sin (3 a+3 b x) \, dx=c^2\,x+\frac {d^2\,x^3}{3}+\frac {c^2\,\sin \left (2\,a+2\,b\,x\right )}{b}-\frac {d^2\,\sin \left (2\,a+2\,b\,x\right )}{2\,b^3}+c\,d\,x^2+\frac {d^2\,x\,\cos \left (2\,a+2\,b\,x\right )}{b^2}+\frac {d^2\,x^2\,\sin \left (2\,a+2\,b\,x\right )}{b}+\frac {c\,d\,\cos \left (2\,a+2\,b\,x\right )}{b^2}+\frac {2\,c\,d\,x\,\sin \left (2\,a+2\,b\,x\right )}{b} \]